package com.wssnail.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;

@Data
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "xml")
public class ReplyMessage {

    @JSONField(name = "touser")
    @XmlElement(name = "ToUserName", required = true)
    private String toUserName;
    @XmlElement(name = "FromUserName", required = true)
    private String fromUserName;
    @XmlElement(name = "CreateTime", required = true)
    private Long createTime;

    @JSONField(name = "msgtype")
    @XmlElement(name = "MsgType", required = true)
    private String msgType;

    @XmlElement(name = "Content", required = false)
    private String content;

    @JSONField(name = "text")
    private Text sendContent;

    @XmlElement(name = "ArticleCount", required = true)
    private Integer articleCount;

    @XmlElementWrapper(name = "Articles")
    @XmlElement(name = "item", required = false)
    private List<Article> Articles;

//    @JSONField(name = "news")
//    private ArticlesDto articlesDto;

    @JSONField(name = "image")
    @XmlElement(name = "Image", required = false)
    private Image image;

    @JSONField(name = "voice")
    @XmlElement(name = "Voice", required = false)
    private Voice voice;

    @JSONField(name = "video")
    @XmlElement(name = "Video", required = false)
    private Video video;

    @JSONField(name = "music")
    @XmlElement(name = "Music", required = false)
    private Music music;
}
